﻿using AutoFacLearn.Demo.Interface;
using System;
using System.Collections.Generic;
using System.Text;

namespace AutoFacLearn.Demo
{

    public class StudentEntity
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public DateTime CreateTime { get; set; }
        public DateTime UpdateTime { get; set; }
    }

    public class StudentDomain : IStudentDomain
    {
        private StudentEntity selfEntitiy;
        public StudentDomain()
        {
            selfEntitiy = new StudentEntity();
        }

        public StudentDomain(StudentEntity studentEntity)
        {
            selfEntitiy = studentEntity;
        }

        public StudentDomain(string name, int id)
        {
            selfEntitiy = new StudentEntity()
            {
                Name = name,
                Id = id
            };
        }

        public void Test()
        {
            Console.WriteLine($"StudentDomain:Name { selfEntitiy.Name }");
        }


    }
}
